package com.security.manage.search.repository;

import com.security.manage.search.model.SoftInstallInfo;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SoftInstallInfoRepository  extends JpaRepository<SoftInstallInfo,Long>, JpaSpecificationExecutor<SoftInstallInfo> {
    SoftInstallInfo findFirst1ByUserId(Long userId, Sort sort);
    List<SoftInstallInfo> findByUserId(Long userId);
    @Transactional
    int removeAllByUserId(Long userId);
}
